﻿@model DeliveryManage.Model.Sys_User
@{
    Layout = null;
}

<!DOCTYPE html>
<html class="x-admin-sm">
<head>
    <meta charset="UTF-8">
    <title>编辑密码</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <link rel="stylesheet" href="~/Content/font.css" />
    <link rel="stylesheet" href="~/Content/framemain.css" />
    <link rel="stylesheet" href="~/Content/icon/iconfont.css" />
    <link rel="stylesheet" href="~/Content/style.css" />
    <script type="text/javascript" src="~/Scripts/jquery-3.3.1.min.js"></script>
    <script type="text/javascript" src="~/Content/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="~/Scripts/framemain.js"></script>
    <script type="text/javascript" src="~/Scripts/laymain.js"></script>
    <script type="text/javascript" src="~/Scripts/common.js"></script>
    <script type="text/javascript" src="~/Scripts/Validform_v5.3.2_min.js"></script>

    <style>
        .editor {
            margin: 0px;
            width: 436px;
            height: 339px;
        }
    </style>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#myform").submit(function () {
                var data = $(this).serialize();
                layer.confirm('确认修改密码吗?', { icon: 3, title: '提示' }, function (index) {
                    $.ajax({
                        type: "POST",
                        url: "/Home/NewEdit",
                        data: data,
                        success: function (obj) {
                            if (obj.status == true) {
                                layer.msg(obj.msg, { icon: 6, title: '提示' }, function (index) {
                                    window.parent.window.location.href = '/Home/Login';
                                });
                            } else {
                                layer.confirm(obj.msg, { icon: 5, title: '提示' }, function (index) {
                                    layer.close();
                                    location.reload();
                                });
                            }
                        }
                    })
                    layer.close();
                });
                return false;

            })
        })
    </script>
</head>
<body>
    <form id="myform">
        <div class="tab-content">
            <dl>
                <dt>旧密码</dt>
                <dd>
                    <input type="password" name="oldpwd" value="" datatype = "s6-16" class ="layui-input" autocomplete = "off" placeholder = "请输入原密码"/>
                    <span class="Validform_checktip">*请输入6~16位密码</span>
                </dd>
            </dl>
            <dl>
                <dt>新密码</dt>
                <dd>
                    <input type="password" name="newpwd" value="" datatype="s6-16" class="layui-input" autocomplete = "off" placeholder="请输入新密码" />
                    <span class="Validform_checktip">*请输入6~16位密码</span>
                </dd>
            </dl>
            <dl>
                <dt >确认密码</dt>
                <dd>
                    <input type="password" name="confirmpwd" value="" datatype="s6-16" class="layui-input" autocomplete="off" placeholder="请输入新密码" />
                    <span class="Validform_checktip">*请输入6~16位密码</span>
                </dd>
            </dl>
            <div class="layui-form-item">
                <input id="btnSubmit" name="btnSubmit" type="submit" value="保存信息" class="layui-btn" />
            </div>
        </div>
        <script>
            layui.use(['form', 'layer'],
                function () {
                    $ = layui.jquery;
                    var form = layui.form,
                        layer = layui.layer;
                });
        </script>
    </form>
</body>
</html>
